{extend name="layout/layout" /}

{block name="pagecss"}

{/block}

{block name="content"}
<div class="row">
	<div class="col-md-12">
		<!-- BEGIN SAMPLE FORM PORTLET-->
		<div class="portlet light">
			<div class="portlet-title">
				<div class="caption">
					<i class="icon-share font-dark"></i>
					<span class="caption-subject font-dark bold uppercase"> {$title}</span>
				</div>
				<div class="actions">
					<a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title=""> </a>
				</div>
			</div>
			<div class="portlet-body">
				<!--<h4>Horizontal Form</h4>-->
				<form id="ajax-form" action="{:url('agent/agentpolicy/editpost')}" class="form-horizontal" name="ajaxForm">
					<div class="form-group">
						<label for="levelName" class="col-md-2 control-label">代理级别</label>
						<div class="col-md-8">
							<input type="text" class="form-control" id="levelName" name="levelName" value="{$info.levelName}" placeholder="">
						</div>
					</div>
					<div class="form-group">
						<label for="reserveAmount" class="col-md-2 control-label">预存金额</label>
						<div class="col-md-8">
							<input type="number" class="form-control" id="reserveAmount" name="reserveAmount" value="{$info.reserveAmount ? $info.reserveAmount / 100 : 0}" placeholder="">
						</div>
						<span class="help-inline">万元</span>
					</div>
					<div class="form-group">
						<label for="buyingPrice" class="col-md-2 control-label">进货价（每开通或续费一个商户的费用）</label>
						<div class="col-md-8">
							<input type="number" class="form-control" id="buyingPrice" name="buyingPrice" value="{$info.buyingPrice ? $info.buyingPrice /100 : 0}" placeholder="">
						</div>
						<span class="help-inline">元/个</span>
					</div>
					<div class="form-group">
						<label for="level" class="col-md-2 control-label">级别</label>
						<div class="col-md-8">
							<select class="form-control" id="level" name="level">
								<option value="1" {if condition="($info['level'] eq 1)"}selected="selected"{/if}>一级</option>
								<option value="2" {if condition="($info['level'] eq 2)"}selected="selected"{/if}>二级</option>
								<option value="3" {if condition="($info['level'] eq 3)"}selected="selected"{/if}>三级</option>
							</select>
						</div>
					</div>

					<input type="hidden" class="form-control" name="id" value="{$info.id}">

					<hr>
					<div class="row">
						<div class="form-actions">
							<div class="col-md-offset-2 col-md-10">
								<button type="button" class="btn blue save-btn">
									保存 <i class="fa fa-floppy-o"></i>
								</button>
								<button type="button" class="btn default" onclick="history.go(-1);">
									返回 <i class="fa fa-mail-forward"></i>
								</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
		<!-- END SAMPLE FORM PORTLET-->
	</div>
</div>

<input type="hidden" class="redirect_url" value="{:url('agent/agentpolicy/index')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/agent/pages/js/agentpolicy.js" type="text/javascript"></script>
{/block}